﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TQB.Common.EmailHelpers;

public partial class EmailDemo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        string toEmail = "admin@qq.com";

        System.Net.Mail.MailMessage message = MailTemplate.Instance.testEmail;

        message.To.Add(toEmail);

        message.Subject = string.Format(message.Subject, 1, 2, 3);

        message.Body = string.Format(message.Body, 1, 2, 3);

        MailService.Instance.SendMail(message);
    }
}